var routerApp = angular.module('routerApp',['ui.router','LocalStorageModule','ngDialog','toaster','ngAnimate']);

routerApp.run(function($rootScope, $state, $stateParams,localStorageService,$window) {
	$rootScope.$state = $state;
	$rootScope.$stateParams = $stateParams;


});

routerApp.config(function ($stateProvider, $urlRouterProvider) {
	
  $urlRouterProvider.otherwise('/index');

     $stateProvider
     	
        .state("index", {//主页
            url: "/index",
            templateUrl: "/view/index/main.html",
			controller:'indexController'
        })
        .state("tax-check", {
            url:"/tax-check",
            templateUrl: "/view/index/tax-check.html",
             params: {'initid': null},
            controller:"checkController"
        })
        .state("tax-yz", {//税务查询
            url:"/tax-yz",
            templateUrl: "/view/index/tax-yz.html",
			controller:'taxyzController'
        })
        .state("tax-check-detail", {//纳税详情列表
            url:"/tax-check-detail",
//          params: {'startTime': null,'endTime':null},
            templateUrl: "/view/index/tax-check-detail.html",
            controller:"nashuiDzDetailController"
        })	
        .state("tax-store-detail", {
            url:"/tax-store-detail",
            templateUrl: "/view/index/tax-store-detail.html",
            controller:"storeDetailController"
        })
        .state("store-detail", {
            url:"/store-detail",
            templateUrl: "/view/index/store-detail.html",
            controller:"nashuiDzMingxiController"
        })
        .state("calendar", {//日历插件
            url:"/calendar",
            templateUrl: "/view/index/calendar.html"
        })
        .state("tax-yz-detail", {
            url:"/tax-yz-detail",
            templateUrl: "/view/index/tax-yz-detail.html",
            controller:"taxyzDetailController"
        })
        .state("day-check", {//日历点击某日异常入库对账
            url:"/day-check",
            templateUrl: "/view/index/day-check.html",
            controller:"dayCheckController"
        })
        .state("tax-schedule", {//纳税企业跟踪
            url:"/tax-schedule",
            templateUrl: "/view/index/tax-schedule.html",
            controller:"taxScheduleController"
        })
        .state("user", {//修改密码
            url:"/user",
            templateUrl: "/view/index/updatePsw.html",
            controller:"updatePswController"
        })
        .state("tax-ds-detail", {//地税详情页
            url:"/tax-ds-detail",
            templateUrl: "/view/index/tax-ds-detail.html",
            controller:"taxDsdetailController"
        })
        ;
        
});
